package com.ssky.bean.validator.core;

import java.io.Serializable;

public class Feedback implements Serializable {
    private static final long serialVersionUID = 1L;

    private final boolean isErr;

    private String code;

    private String msg;

    private String tag;

    private String value;

    public Feedback(boolean isErr) {
        this.isErr = isErr;
    }

    public Feedback(boolean isErr, String code, String tag) {
        this(isErr, code, null, tag, null);
    }

    public Feedback(boolean isErr, String code, String msg, String tag) {
        this(isErr, code, msg, tag, null);

    }

    public Feedback(boolean isErr, String code, String msg, String tag, String value) {
        this.isErr = isErr;
        this.code = code;
        this.msg = msg;
        this.tag = tag;
        this.value = value;
    }

    public boolean isErr() {
        return isErr;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "Feedback{" +
                "isErr=" + isErr +
                ", code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                ", tag='" + tag + '\'' +
                ", value='" + value + '\'' +
                '}';
    }
}